home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR10 / COMP91A.ZIP / COMPILER.TXT < prev    next >
Text File  |  1993-06-04  |  18KB  |  390 lines

  1. Universal Hint System
  2. Revision 91a
  3. Compiler for MS-DOS, Version 1.50
  4.   (June 3, 1993)
  5.  
  6. Copyright 1992-1993 by Jason Strautman
  7.  
  8.  
  9. I assume that anyone who is about to write a file already has downloaded
  10. and used a 91a UHS reader, either for DOS or Windows.  If you have not
  11. already done so, make sure that you do before writing any file, so that you
  12. can get an idea as to what the file should be like.  You should also read a
  13. copy of the hint writing guidelines included in this ZIP archive for some
  14. helpful hints.
  15.  
  16.  
  17. Hunk Types
  18. ==========
  19.  
  20. A 91a UHS file is composed of a series of various types of hunks.  A hunk
  21. may either hold information, such as hints or author credits, or other
  22. hunks.  Each hunk will contain a title which is shown in the readers for
  23. selection by the user.  The hunk name may be abbreviated to 4 characters.
  24. Here are the types of hunks:
  25.  
  26.  
  27. [subject]
  28. ---------
  29. This may be the most important of the hunks in the UHS file, since it is
  30. used to group all of the other hunks, including other [subject] hunks.  You
  31. will probably want to use several levels of [subject]s in the file, to help
  32. organize your file.
  33.  
  34. There is no extra data in the [subject]; only a title and nested hints are
  35. used.
  36.  
  37.  
  38. [hint]
  39. ------
  40. A hint may contain an unlimited number of ten-line clues.  The title should
  41. pose either a problem ("I can't get through the door!") or a question ("How
  42. do I get through the door?").  The data that follows are the hints that
  43. answer the problem/question in the title.  Each new hint should begin with
  44. the string ">> ", including the space.  The hint should follow on the same
  45. line.  If you need to use several lines in the hint, leave out that
  46. identifier, and only include the hint line in the data.
  47.  
  48.  
  49. [comment] and [credit]
  50. ----------------------
  51. Both of these include a title and up to ten lines of data.  [credit]s
  52. contain information about the author(s) of the file, while [comment]s cover
  53. anything else, except for game hints.  [comment]s are often used to explain
  54. the file, such as how it is structured.  See the guidelines for more
  55. information.
  56.  
  57.  
  58. [GIFa]
  59. ------
  60. UHS 91a files may contain embedded GIF graphics, with a maximum resolution
  61. of 320x200, and no more than 16 colors.  These graphics may be used to draw
  62. maps or point out an area on a screen shot.  The data in the outline should
  63. be one line that has the path and filename of the GIF file.  The proper data
  64. will be inserted into the compiled file.
  65.  
  66.  
  67. Additional hunks will be added by the compiler.  However, you do not need to
  68. worry about writing these hunks yourself.
  69.  
  70.  
  71. The Outline
  72. ===========
  73.  
  74. In order to create a compiled file, you will need to create an outline that
  75. gives the data which will be placed in the hunks.  The first level of the
  76. outline is a single [subject] hunk, whose title is also the title of the
  77. game for which you are writing hints.  This [subject] is automatically
  78. selected when the file is loaded.
  79.  
  80. Every hunk after the [subject] should be indented two spaces.  Indention
  81. tells the compiler that the hunks that follow are embedded in the previous
  82. [subject].  You should also indent an additional two spaces as more levels
  83. of hunks are used.  All hunks that are on the same level will be indented
  84. the same amount of space.  You should "un-indent" to separate hunks on the
  85. same level into different menus.  Here is an example.  (Any text in curly
  86. brackets is an added comment, that should not be included in the outline
  87. that you write.)
  88.  
  89. [subject] Sample File  {Notice that the title goes on the same line,}
  90.                        {with a space separating the two.}
  91.   [subject] Grouping 1 (Item 1)
  92.     [hint] Menu 1; Item 1
  93.     [hint] Menu 1; Item 2
  94.     [hint] Menu 1; Item 3
  95.   [subject] Grouping 2 (Item 2)  {The indentation has changed.  This means}
  96.                                  {that the a new menu has been started.}
  97.     [hint] Menu 2; Item 1
  98.     [hint] Menu 2; Item 2
  99.     [hint] Menu 2; Item 3
  100.     [subject] Grouping 3 (Item 4 on Menu 2)
  101.       [comment] Menu 3; Item 1
  102.       [hint] Menu 3; Item 2
  103.       [hint] Menu 3; Item 3
  104.   [subject] Grouping 4 (Item 3)  {This is on the same level as groupings 1}
  105.                                  {and 2, since is indented the same amount.}
  106.  
  107. The top menu of the file contains three choices: "Grouping 1", "Grouping 2",
  108. and "Grouping 3".  If the user selects "Grouping 1", then three choices will
  109. be presented.  "Grouping 2" is outdented from the three hints above it, so
  110. the compiler knows that item 3 is the last one on the first menu.  But since
  111. this grouping is aligned with the first one (and nothing is outdented
  112. between the two groupings), both are found on the same menu.  The second
  113. grouping has four items, including one additional grouping.  Notice that all
  114. are on the same level of indentation.  But "Grouping 3" provides even
  115. further structuring on the file, which contains three additional choices.
  116. "Grouping 4" is to the left of both "Grouping 3" and "Menu 3; Item 3".  Both
  117. groupings 2 and 3 are ended, since this [subject] is outdented from the
  118. items under the previous two subject.  But once again, the [subject] is on
  119. the same level as the first two, so all are on the same menu.
  120.  
  121. The data of a hunk is also indented two spaces from its title line.  But
  122. with the exception of the [subject] hunk, no additional hunks may be added
  123. inside another.  A [comment] hunk would be written as follows:
  124.  
  125. [comment] Things to Know
  126.   This is a properly written file, or at least a portion of one.  In a real
  127.   file, there would be a [subject] above this, and this hunk would be
  128.   indented, since it is a part of that main [subject].
  129.   [hint] But this hunk is illegal.
  130.     >> It should be on the same level as the *title* of the [comment], as
  131.     found in the next [hint].
  132. [hint] Now this is correct.
  133.   >> Notice how the title is aligned with the title of the [comment], since
  134.   both should be on the same level of the file.
  135.   >> If you didn't want these two hunks to appear on the same menu, you
  136.   would have to use a [subject] to separate them.
  137.  
  138. In your outline, you may use blank lines for clarity.  You can also use
  139. semicolons (";") to mark comments that will not be included in the compiled
  140. file.  The semicolons should be in the first column of the line, not
  141. indented.
  142.  
  143. Also note that the 78-character limit mentioned in the guidelines does not
  144. include any indentation, the type of hunk included in square brackets, or
  145. the ">> " of a new line of hints.  Begin your count with the first character
  146. of the title or data.
  147.  
  148.  
  149. Sample Outline
  150. ==============
  151.  
  152. This is a short version of how a UHS outline should be written, and of how
  153. the file might be structured.  I have used the four-character abbreviations
  154. for the hunk names.  And in case you are printing this text file out, I have
  155. cut off lines longer than 80 characters, even though you can use longer
  156. lines in the outlines.  Just make sure that the data is shorter than 78
  157. characters.
  158.  
  159. [subj] UHS 91a Sample File
  160.  
  161. ; The following block is the first selection on the "main menu"
  162.   [subj] General Information
  163.     [comm] Everything you wanted to know about the UHS, but were afraid to ask:
  164.       The Universal Hint System was invented by Jason Strautman (CIS [72337,261
  165.       AOL JStrautman).
  166.     [cred] About the file author.
  167.       Jason (we've seen his name a lot on this file, haven't we?) Strautman
  168.       wrote this file.  He can be reached on CompuServe at [72337,2611], or
  169.       on AOL as JStrautman.
  170.     [cred] About SAMPLE's publisher.
  171.       If SAMPLE were a real game, then you might see the game's publisher,
  172.       designer, programmers, or other related people mentioned here.  But since
  173.       SAMPLE doesn't exist, then you won't see anything here.
  174.     [comm] Writing your own UHS file
  175.       I'm not going to go through that long speech, since it's in this manual.
  176.  
  177. ; Second selection
  178.   [subj] The Mountains
  179.     [hint] How do I get past the small giant?
  180.       >> First of all, you should ask yourself what a small giant is.
  181.       >> The phrase "small giant" is an oxymoron.
  182.       An oxymoron is a phrase that contradicts itself.
  183.       >> Now think about whether or not an oxymoron can exist in reality.
  184.       >> If you're literal enough, they can't exist.
  185.       >> You'll have to figure out how to be literal with the parser.
  186.       >> Just think away the small giant, and he'll disappear.
  187.       The only thing left is an explanation of the interface.
  188.       Read your manual to find out how to do so, and the giant should disappear.
  189.     [hint] How do I climb down the cliff?
  190.       >> Do you have anything like a rope in your inventory?
  191.       >> Of course you don't.  That would be too simple of a puzzle.
  192.       Do you see any formations on the rocks?
  193.       >> And have you ever seen mountain climbers?
  194.       They use spikes for their work.
  195.       >> So you can use an icicle.
  196.       Break off an icicle with your hands and use it on the cliff.
  197. ; Use further nesting to handle multiple solutions, if you want
  198. ; All of the details are hidden away on a new menu
  199.     [subj] How do I get enough money to pay the guide?
  200.       [comm] What is the difference in the two solutions?
  201.         The first one requires you to be violent, but it gets you more points.
  202.         The non-violent (second) solution gets you fewer points, although it
  203.         does make for better family entertainment.
  204.       [hint] Solution I
  205.         >> If you read the comment above, you would realize that this is a
  206.         violent solution.
  207.         >> The banker is probably carrying money in his briefcase.
  208.         >> He's also probably unarmed.
  209.         >> Just shoot him and steal the money.
  210.       [hint] Solution II
  211.         >> This is a non-violent solution, but it's still not "nice."
  212.         >> I guess you've been to the alley.
  213.         >> Then you must have seen that bum.
  214.         >> He's blind.
  215.         >> Just steal the money from his hat.
  216.  
  217. ; Third selection
  218.   [subj] The Valley
  219.     [hint] Why is the valley so empty?
  220.       >> Do you see anything interesting to do here?
  221.       >> Of course not!
  222.       >> That's why the valley is so empty - it's too boring.
  223.     [hint] I've fallen and I can't get up!
  224.       >> Did you buy Life Savers?
  225.       >> They wouldn't do you any good anyway, since you don't need candy.
  226.       >> You still should have chosen a similarly-named product.
  227.       >> Remember the Life Saver II?  Restore and buy it instead.
  228.  
  229. ; Fourth selection
  230.   [subj] Maps
  231.     [gifa] The Mountains: Part I
  232.       C:\MYUHS\MOUNT1.GIF
  233.     [gifa] The Mountains: Part II
  234.       C:\MYUHS\MOUNT2.GIF
  235.     [gifa] The Valley: Part I
  236.       C:\MYUHS\VALLEY.GIF
  237.  
  238.  
  239. The Editor
  240. ==========
  241.  
  242. This is pretty much a standard text editor that uses standard text editing
  243. keys.  You can leave multiple files open at the same time, and even though the
  244. default filename is "*.91A", you can open any file of any type, either from
  245. the menu bar or by entering the filename as a command line parameter.  Files
  246. must be smaller than 64K.
  247.  
  248. If you are working on a UHS outline, the editor will make its best guess about
  249. what type of data you will want to enter next.  It will assume that a "[hint]"
  250. follows each "[subject]", a ">> " follows each "[hint]" or another ">> " and
  251. an unformatted line follows any other kind of hunk.  The editor also
  252. auto-indents your data as necessary, but it does not wrap your text to the
  253. next line.
  254.  
  255. If you don't like the formatting that the editor suggests, you can override it
  256. in several ways.  The first of these is to press CTRL-ENTER instead of ENTER
  257. at the end of the line; when you do this, the editor does not insert any hunk
  258. types on the next line.  A number of function keys are also provided to change
  259. the hunk type that the compiler gives you.  Be careful using these, though,
  260. because any text to the left of the cursor will be deleted.  You can also use
  261. the CTRL-B key combination to quickly wipe out the line and unindent 2 spaces.
  262. Press the F1 key for more information on what these keys are.
  263.  
  264.  
  265. Running the Compiler
  266. ====================
  267.  
  268. Once you've created your outline, you need to get authorization from me to
  269. use the compiler.  Send me an e-mail message or write to me through the post
  270. office.  Addresses are listed at the bottom of this document.  Let me know
  271. the game that you want to write hints for, and give me the file title
  272. *exactly* as it will appear in your file.  I will send you a code that is
  273. based on this title, so if you change the title, then the code will be
  274. invalid.  If someone is already working on or has finished a file for this
  275. game, I will let you know, so that you can select another game.  And once
  276. you are finished, I will send you a registered copy of the DOS, TSR, and
  277. Windows readers on a disk.
  278.  
  279. You will need to enter the information needed to compile your file from within
  280. the editing environment.  Select "Compiler | Parameters" and enter the
  281. appropriate filenames into the dialog box.  This program will assume that the
  282. file is located in the current directory; if a file is not in that directory,
  283. you will need to specify the drive and/or path name.  The input file is the
  284. outline you are working on, the output is a completed .UHS file, and the 88a
  285. header is a UHS 88a file that will be displayed on 88a-only UHS readers.  You
  286. should use the STD_88a.UHS file or some other UHS 88a file that instructs
  287. people on how to find a newer UHS reader so they can view your hints.  The
  288. authorization code is the number that I will give you.
  289.  
  290. You only need to enter this information once per file; it is saved into a file
  291. called UHSCMP.INI and will be loaded whenever you start the compiler.  The
  292. UHSCMP.INI file should be in the same directory as the compiler.  You can
  293. create or edit this file if you want to change the parameters without using
  294. the dialog box (perhaps in a batch file).  Each line in UHSCMP.INI specifies
  295. the information in the dialog box, in the same order as shown there.
  296.  
  297. Once you have specified the necessary information, select "Compiler | Compile"
  298. from the menu bar to create a .UHS file.  You will then be informed on the
  299. progress of compilation.  Any errors will also be reported as they are found.
  300. If there are any errors detected during compilation, they will be listed again
  301. after all portions of the file have been checked.  Otherwise, the file will be
  302. closed, ready for testing and distribution.
  303.  
  304.  
  305. Errors
  306. ======
  307.  
  308. Here is a list of all the possible errors in a file:
  309.  
  310. #1) Multiple titles were detected within the file.  You should have one
  311. [subject] in the first column, and all other hunks should be indented within
  312. that title hunk.  If you have to, create a new title and place your other
  313. [subject]s inside that hunk.
  314.  
  315. #2) (this error will never be displayed)
  316.  
  317. #3) You specified a hunk that was not one of the ones listed above.  Check
  318. your spelling on that line.
  319.  
  320. #4) You created a [credit] or [comment] that is longer than 10 lines, the
  321. maximum for a 91a files.  You should change the hunk into a [hint] hunk,
  322. with several (multi-line) hints, or break it into several [credit] or
  323. [comment] hunks.  You might also want to consider shortening your text,
  324. since you should rarely need more than the given space.
  325.  
  326. #5) You indented something other than a hunk inside another hunk.  A hunk
  327. name should begin with a left square bracket ("[").  You may have simply
  328. forgotten to add the bracket before the hunk type.  You cannot indent data
  329. text, even for visual effect; the compiler believes that this is a new
  330. non-hunk hunk.  If this is the case, start the text on the same column as
  331. the rest of the data.  Or, move the semicolon of a comment to the first
  332. column.
  333.  
  334. #6) A [GIFa] hunk should only have one line of data: the filename of the
  335. external GIF file to be important.  Make sure that you start a new hunk on
  336. the line after that oneline of data.
  337.  
  338. #7) You attempted to place another hunk inside a [comment] or [credit].
  339. Remove it, or bring it to the left to place it on the same level as the
  340. [comment] or [credit].
  341.  
  342. #8) The same as #7, only with a "parent" [hint] hunk.
  343.  
  344. #9) A character not in the range of ASCII codes between 32 and 127 was
  345. detected.  Do not include accent characters for foreign languages, which may
  346. cause this problem.  Also make sure that no word processing commands are in
  347. your outline.
  348.  
  349. #10) Your line is over 78 characters.  If you can break it into two (if it
  350. is part of the data set for a [comment], [credit], or [hint]), then do so.
  351. If it is the title to a hunk, you must shorten the title.
  352.  
  353. One additional error will cause the compiler to stop: an invalid
  354. authorization code.  The entire file will be checked, so that you can
  355. continue to correct any errors while you are waiting for the authorization
  356. code.  But you will not have a completed file to distribute.  If you do have
  357. a code, check to make sure that the title you sent me matches the title in
  358. the outline.
  359.  
  360.  
  361. Distribution
  362. ============
  363.  
  364. This compiler may be used without any cost.  However, distribution is
  365. limited to non-commercial BBS's, provided that this archive is not modified,
  366. that no fee is charged for access to the UHS and its related files, and that
  367. the BBS is open to the general public.  But please send me a letter letting
  368. me know when the UHS has been uploaded.
  369.  
  370. Anyone else wishing to distribute the UHS must receive prior approval from
  371. me.
  372.  
  373.  
  374. Changes Since Version 1.00
  375. ==========================
  376.  
  377. 1.50: Adds integrated editing environment and makes related changes.
  378.  
  379. 1.02: Allows comments to be placed inside [hint]s and [comment]s.
  380.  
  381. 1.01: Mentions America On-Line in compiler author information.
  382.  
  383.  
  384. Jason Strautman
  385. 239 Redwood
  386. San Antonio, TX  78209
  387. CIS: [72337,2611]
  388. AOL: JStrautman
  389.  
  390.